﻿using MhAdmin.Application.Services.CMD.MasterDataGroup.Dto;
using MhAdmin.System.Entity.CMD;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MhAdmin.Application.Services.CMD.MasterDataGroup
{
	public interface IMasterDataGroupService : ITransient
	{
		/// <summary>
		/// 添加主数据群组
		/// </summary>
		/// <param name="input">添加参数</param>
		/// <param name="name">名称</param>
		/// <returns></returns>
		Task Add(MasterDataGroupAddInput input, string name = MhAdminConst.MasterDatagroup);

		/// <summary>
		/// 主数据群组分页查询
		/// </summary>
		/// <param name="input">查询参数</param>
		/// <returns>分页列表</returns>
		Task<SqlSugarPagedList<SysMasterDataGroup>> Page(MasterDataGroupPageInput input);

		/// <summary>
		/// 刷新缓存
		/// </summary>
		/// <returns></returns>
		Task RefreshCache();

		/// <summary>
		/// 编辑主数据群组
		/// </summary>
		/// <param name="input">编辑参数</param>
		/// <param name="name">名称</param>
		/// <returns></returns>
		Task Edit(MasterDataGroupEditInput input, string name = MhAdminConst.MasterDatagroup);

		/// <summary>
		/// 删除主数据群组
		/// </summary>
		/// <param name="input">id列表</param>
		/// <param name="name">名称</param>
		/// <returns></returns>
		Task Delete(List<BaseIdInput> input, string name = MhAdminConst.MasterDatagroup);

		/// <summary>
		/// 获取主数据群组列表
		/// </summary>
		/// <returns>主数据群组列表</returns>
		Task<List<SysMasterDataGroup>> GetListAsync();
	}
}
